<template>
    <el-card class="box-card">
      <template #header>
        <div class="card-header">
          <span>个人信息</span>
        </div>
      </template>
      <el-form style="margin-left: -40px;" label-position="right" label-width="100px">
        <el-form-item label="用户名">
          <el-input v-model="userInfo.username"></el-input>
        </el-form-item>
        <el-form-item label="邮箱">
          <el-input v-model="userInfo.email"></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input v-model="userInfo.phone"></el-input>
        </el-form-item>
        <el-form-item label="地址">
          <el-input v-model="userInfo.address"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="saveChanges">保存修改</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </template>
  
  <script>
  export default {
    data() {
      return {
        userInfo: {
          username: '',
          email: '',
          phone: '',
          address: '',
        }
      };
    },
    methods: {
      saveChanges() {
        // 这里可以添加保存信息的逻辑
        this.$message.success('信息保存成功！');
      }
    }
  };
  </script>
  
  <style scoped>
  .box-card {
    width: 480px;
    height: auto;
    background-color: rgba(112, 162, 162, 0.156);
    margin-left: 600px;
    
  }
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  </style>
  